# -*- coding:utf-8 -*-
from typing import List

from pandas import DataFrame, Series


def sma(data: Series, period: int) -> Series:
    """
    Simple Moving Average 简单移动平均数：将一组股价值相加，再除以股价的个数
    \[SMA_{t = 5} = \frac{{{p_1} + {p_2} + {p_3} + {p_4} + {p_5}}}{5}\]
    """
    return data.rolling(period).mean()
